//
//  LYCompanyItemCell.m
//  SelectCity
//
//  Created by liuyan on 2019/3/14.
//  Copyright © 2019年 liuyan. All rights reserved.
//

#import "LYCompanyItemCell.h"

@interface LYCompanyItemCell()

/**
 每个子类别标签
 */
@property (strong, nonatomic) UILabel *typeLabel;

@end

@implementation LYCompanyItemCell

- (void)setTitle:(NSString *)title isSelect:(BOOL)isSelect{
    if (!_typeLabel) {
        _typeLabel = [[UILabel alloc] initWithFrame:self.bounds];
        _typeLabel.font = Font(Font_13);
        _typeLabel.textColor = THEMECOLOR_OF_TEXT_666666;
        _typeLabel.textAlignment = NSTextAlignmentCenter;
        _typeLabel.layer.cornerRadius = 5;
        _typeLabel.clipsToBounds = YES;
        [self addSubview:_typeLabel];
    }
    if (isSelect) {
        _typeLabel.backgroundColor = THEMECOLOR_OF_ORANGE;
        _typeLabel.textColor = COLOR_OF_WHITE;
    } else {
        _typeLabel.backgroundColor = THEMECOLOR_OF_GRAY;
        _typeLabel.textColor = THEMECOLOR_OF_TEXT_666666;
    }
    _typeLabel.text = title;
}

@end
